package com.wdd.myplatform.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * @author wdd 2022/4/21
 */
@Slf4j
@Component
public class RedisReceiver implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] bytes) {

        log.info("消息订阅成功---------");
        log.info("内容："+new String(message.getBody()));
    }
}
